package com.itheima.job;

import com.alibaba.dubbo.config.annotation.Reference;

import com.itheima.service.CleandateService;
import com.itheima.service.OrderSettingService;

import java.text.SimpleDateFormat;

import java.util.Date;

public class CleanBeforeTodayJob {

@Reference
    OrderSettingService orderSettingService;
    public void clear(){

        System.out.println("-----STAR------");
        SimpleDateFormat sdf=new SimpleDateFormat("yyy-MM-dd");
        String day = sdf.format(new Date());
        System.out.println("--------ing-------"+day);
        orderSettingService.cleanBeforetoday(day);
        System.out.println("-----end------");
    }
}
